package com.pureland.common.entity;


import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @projectName: pureland_cloud
 * @className: com.pureland.common.entity.BaseEntity
 * @description: 基础实体类,封装基础的公共字段
 * @author: tong.li
 * @createTime: 2020/9/26 17:58
 * @version: v1.0
 * @copyright: 版权所有 李彤 © 2020
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class BaseEntity<T> implements Serializable {

    private static final long serialVersionUID = 98972301235621435L;

    @ApiModelProperty(value = "主键")
    protected T id;

    /**
     * 创建人ID
     */
    @ApiModelProperty("创建人ID")
    protected T createdBy;

    /**
     * 创建人名称
     */
    @ApiModelProperty("创建人名称")
    protected String createdName;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    protected LocalDateTime createdTime;


    /**
     * 删除标识:true删除,false正常
     */
    @ApiModelProperty("删除标识:true删除,false正常")
    protected boolean deleted;

}
